function father (name){
    this.name = name
}
father.prototype.sayname=function(){
    console.log(this.name);
}

// var fa = new father('lwt')
// fa.sayname()



function son(name){
    father.call(this,name)
}

son.prototype = Object.create(father.prototype)

son.prototype.constructor = son

var son1 = new son('fy')

son1.sayname()

